package com.example.kotlindemo

import android.widget.Toast
import com.example.kotlindemo.demo.CallBack
import com.example.kotlindemo.demo.Unit12
import java.util.ArrayList

/**
 * Author 87231
 * 2022/8/17 22:53
 *
 * Utils
 * describe：
 **/
class Utils {
    lateinit var callBacks:ArrayList<CallBack>
        fun addCallback(callBack: CallBack){
            this.callBacks = callBacks
        }
    fun run(){
        for (callBack in callBacks) {
            callBack.onA(System.currentTimeMillis().toString())
        }
    }
    fun removeCallBack(callBack: CallBack?){
       callBacks.remove(callBack)
        println("removeCallBack")
    }


}